package com.blog.wl2023.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.PrePersist;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author wule
 * @desc 文章实体类
 */
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "caprice")
@Data
public class Caprice extends BaseEntity {

	@Column(name = "user_id")
	private String userId;
	@Column(name = "create_time")
	private Date createTime;

	@Column(name = "caprice_content")
	private String capriceContent;

	@Column(name = "is_delete")
	private Integer isDelete;

	@PrePersist
	public void prePersist() {
		this.createTime = new Date();
	}


}
